<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
     <html>
        <head>
        <script>
                               //导航 依赖elment模块
                               layui.use('element',function(){
                                var element = layui.element;
                               })
                               //加载form模块
                                      layui.use("form",function(){
                                       var form = layui.form;
                                      })
                                      form.on('submit(formDemo)', function(data){
                                       layer.msg(JSON.stringify(data.field));
                                       return false;
                                       })
                            </script>
        <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
        <script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>单一产品查询页面</title>
        </head>
        <body>
        <div class="layui-layout layui-layout-admin">
                        <div class="layui-header">
                          <div class="layui-logo layui-hide-xs layui-bg-black">旅游管理系统</div>
                          <ul class="layui-nav layui-layout-left">
                            <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                                <i class="layui-icon layui-icon-spread-left"></i>
                              </li>
                          </ul>
                    <ul class="layui-nav layui-layout-right">
                        <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                            <a href="javascript:;">
                              <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img">
                              Admin
                            </a>
                            <dl class="layui-nav-child">
                              <dd><a href="alogOut">退出登录</a></dd>
                            </dl>
                          </li>
                    </ul>
                    <div class="layui-side layui-bg-black">
                        <div class="layui-side-scroll">
                    <ul class="layui-nav layui-nav-tree" lay-filter="test">
                        <li class="layui-nav-item"><a href="javascrript:;">产品管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="toAdd">产品添加</a></dd>
                                <dd><a href="toUp">产品修改</a></dd>
                                <dd><a href="toDel">产品删除</a></dd>
                                <dd><a href="search">产品查询</a></dd>
                                <dd><a href="toSelectOne">单一产品查询</a></dd>
                            </dl>
                        </li>
                        <li class="layui-nav-item"><a href="javascrript:;">帖子管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="toDeC">帖子删除</a></dd>
                                <dd><a href="searchC">帖子查询</a></dd>
                                <dd><a href="toSelOC">单一帖子查询</a></dd>
                            </dl>
                        </li>
                        <li class="layui-nav-item"><a href="javascrript:;">用户管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="toDelete">用户删除</a></dd>
                            </dl>
                        </li>
                        <li class="layui-nav-item">
                            <a href="javascrript:;">用户订单管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="initDeO">用户订单删除</a></dd>
                                <dd><a href="toSelect">单一用户订单查询</a></dd>
                                <dd><a href="selectAllOrder">查询所有用户订单</a></dd>
                                <dd><a href="initChange">修改用户订单状态</a></dd>
                            </dl>
                        </li>

                    </ul>
                    </div>
                    </div>
                </div>
                </div>
        <div style="width: 1650px;position: relative; left:15%; margin-top: 100px;">
        <h3>单一产品查询</h3>
        <br>
        <br>
        <form class="layui-form" action="${pageContext.request.contextPath}/selectOneProducts" method="post">
                <div class="layui-form-item" >
                           <label class="layui-form-label">产品编号</label>
                           <div class="layui-input-inline">
                          <input type="text" name="pid" required  lay-verify="required" placeholder="请输入产品编号" autocomplete="off" class="layui-input">
                     </div>
                </div>
                <div class="layui-form-item">
                               <div class="layui-input-block">
                               <button class="layui-btn" lay-submit lay-filter="formDemo">查询</button>
                               <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                           </div>
                      </div>
                </form>
                ${msg}
        <br>
        <br>
        <table class="layui-table" lay-size="lg">
                                        <thread>
                                                                                <tr>
                                                                                <th>产品图片</th>
                                                                                <th>产品编号</th>
                                                                                <th>产品名字</th>
                                                                                <th>产品位置</th>
                                                                                <th>产品价格</th>
                                                                                <th>产品类型</th>
                                                                                </tr>
                                                                                </thread>
                                        <c:forEach items="${p}" var="pp" >

                                        <tbody>
                                        <tr>
                                        <td><img style="width:100px;height:100px" src="${pp.pimg}"></td>
                                        <td>${pp.pid}</td>
                                        <td>${pp.pname}</td>
                                        <td>${pp.ploct}</td>
                                        <td>${pp.pprice}</td>
                                        <td>${pp.ptype}</td>
                                        </tr>
                                        </tbody>
                                        </c:forEach>
                                        </table>
            </div>
            </body>
            </html>